<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <Canvas id="c1" width="600" height="400">
        当前浏览器不支持canvas，请下载最新的浏览器
    </Canvas>
    <script>
        /** @type {HTMLCanvasElement}**/
        var c1 = document.getElementById("c1");
        if(!c1.getContext){
            console.log('当前浏览器不支持canvas，请下载最新浏览器')
        }
        var ctx = c1.getContext('2d');
        
        
        ctx.font = "100px Micrsoft YaHei";

        ctx.textAlign ="center";
        ctx.textBaseline ="middle";
        ctx.direction ="rtl";
        ctx.fillText('天干地支!',300,200);

        ctx.arc(300,200,5,0,2*Math.PI);
        ctx.fill();
        
    </script>
</body>
</html>